package com.ciwong.epaper.modules.epaper.ui;

import android.view.View;

import com.ciwong.epaper.modules.epaper.bean.Node;
import com.ciwong.epaper.modules.epaper.util.LayersView;
import com.ciwong.mobilelib.i.VertifyDurationListener;

public abstract class LayersViewItemClickListener extends VertifyDurationListener implements LayersView.ItemClick {
    /**
     * 构造方法
     */
    public LayersViewItemClickListener() {

    }

    /**
     * 构造方法
     *
     * @param duration 防止重点间隔时间
     */
    public LayersViewItemClickListener(long duration) {
        this.duration = duration;
    }


    /**
     * 防止重复点击时调用
     */
    public abstract void avertRepeatOnClick(Node node, View view);


    @Override
    public void lastItemClick(Node node, View view) {
        if (VertifyDuration()) {
            avertRepeatOnClick(node, view);
        }
    }

    @Override
    public boolean freeForLearnContralItemClick(int item, Node node, Node node0) {
        return false;
    }
}
